Skip to content

[AIC-py] hf example#816

Draft
jonathanlastmileai wants to merge 2 commits intomainfrom
pr816
Draft

[AIC-py] hf example#816
jonathanlastmileai wants to merge 2 commits intomainfrom
pr816

Conversation

@jonathanlastmileai
Copy link
Contributor

@jonathanlastmileai jonathanlastmileai commented Jan 9, 2024

[AIC-py] hf example

Idea for this config:

  • translate instructions from french to english: "racontez l'histoire du vif renard brun"
    -> translate_fr_to_en prompt
    -> generate story
    -> summarize story
    -> generate audio title saying the summary
    -> generate image of the summary as well

Somehow we can connect image-text and ASR as well, not sure yet.

This PR is a starting point for the idea above. Currently I'm having it translate the other way.
Added example prompts for mt, summarization, and tts.


Stack created with Sapling. Best reviewed with ReviewStack.

@jonathanlastmileai jonathanlastmileai force-pushed the pr816 branch 5 times, most recently from ef49940 to 199467f Compare January 9, 2024 19:55
@jonathanlastmileai jonathanlastmileai changed the title [rfc][wip] example hf config [AIC-py] hf example Jan 9, 2024
test

patch #816

python extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/run_hf_example.py extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/hf_local_example.aiconfig.json


-> "red fox in the woods"
Idea for this config:

* translate instructions from french to english: "racontez l'histoire du vif renard brun"
  -> translate_fr_to_en prompt
    -> generate story
      -> summarize story
        -> generate audio title saying the summary
        -> generate image of the summary as well

Somehow we can connect image-text and ASR as well, not sure yet.



This PR is a starting point for the idea above. Currently I'm having it translate the other way.
Added example prompts for mt, summarization, and tts.
jonathanlastmileai added a commit that referenced this pull request Jan 9, 2024
test

patch #816

![pic](https://github.com/lastmile-ai/aiconfig/assets/148090348/d5cc26b3-6cb7-4331-af8a-92fd8c4e2471)

python extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/run_hf_example.py extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/hf_local_example.aiconfig.json


-> "red fox in the woods"
jonathanlastmileai added a commit that referenced this pull request Jan 9, 2024
test

patch #816

![pic](https://github.com/lastmile-ai/aiconfig/assets/148090348/d5cc26b3-6cb7-4331-af8a-92fd8c4e2471)

python extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/run_hf_example.py extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/hf_local_example.aiconfig.json


-> "red fox in the woods"
jonathanlastmileai added a commit that referenced this pull request Jan 9, 2024
test

patch #816

![pic](https://github.com/lastmile-ai/aiconfig/assets/148090348/d5cc26b3-6cb7-4331-af8a-92fd8c4e2471)

python extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/run_hf_example.py extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/hf_local_example.aiconfig.json


-> "red fox in the woods"
@rossdanlm
Copy link
Contributor

Just to be clear, is this now replaced by Sarmad's changes to HF cookbook in #826 ?

rossdanlm added a commit that referenced this pull request Jan 9, 2024
[AIC-py] hf image2text parser

test

patch #816


![pic](https://github.com/lastmile-ai/aiconfig/assets/148090348/d5cc26b3-6cb7-4331-af8a-92fd8c4e2471)

python
extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/run_hf_example.py
extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/hf_local_example.aiconfig.json


-> "red fox in the woods"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants